
{{template "header.html" .}}

<div class="container fixed">
	<div class="row row-fixed">
		<div class="span9">
			{{template "topic/nav.html" .}}

			{{range .topics}}
			<div class="media">
				<a class="pull-left" href="#">
					<img src="{{$.qiniuDomain}}{{.User.AvatarImgSrc}}" class="img-rounded"></img>
				</a>
				<div class="media-body">
					<span class="time pull-right">
						<abbr class="timeago" title="{{datetime .Created}}+00:00"></abbr>
					</span>
					<h4 class="media-heading">
						<a href="{{url "Topic.Show" .Id}}" style="font-size: 15px;">{{.Title}}</a>
						{{if eq .User.Id $.user.Id}}
						<a href="{{url "Topic.Edit" .Id}}"><i class="icon-edit"></i></a>
						{{end}}
					</h4>
					<span class="label">{{.Category.Name}}</span> ·
					<span class="">{{.User.Name}}</span>
					{{if .Hits}} · <span class="">{{.Hits}} 次浏览</i></span>{{end}}
					{{if .Replies}}
					<span class="badge badge-info pull-right">{{.Replies}}</span>
					{{end}}
				</div>
			</div>
			{{end}}

			<div class="pagination pagination-centered">
				<ul>
					{{range .pagination.Pages}}
					<li{{if .IsCurrent}} class="active"{{end}}><a href="{{.Url}}">{{.Num}}</a></li>
					{{end}}
				</ul>
			</div>
		</div>

		<div class="span3">
			{{template "topic/sidebar.html" .}}
		</div>
	</div>
</div>

{{template "footer.html" .}}
